<template>
	<view>
		<view class="pagess">
			<!-- <view class="mask"></view> -->
			<uNavbar title="往期回顾" bgColor="#E0DDDA" leftIconColor="#ffffff" ></uNavbar>
			<view class="main">
				<view class="wrap" v-for="item in selllist" :key="item.id">
					<view class="tit">
						{{item.name}}
					</view>
					<view class="item">
						<text>开奖时间</text>
						<text>{{item.winning_time}}</text>
					</view>
					<view class="item">
						<text>开奖号码</text>
						<text>{{item.winning_number}}</text>
					</view>
					<view class="item">
						<text>体彩期数</text>
						<text>{{item.lottery_periods}}期</text>
					</view>
		
<!-- 					<view class="item">
						<text>中奖用户</text>
						<text>{{item.nickname}}</text>
					</view>
					<view class="item">
						<text>开奖机型</text>
						<text>{{item.phone_name}}</text>
					</view> -->
			
				</view>
				<noDatas :xxxList="selllist"  :status="status" ></noDatas>
			</view>

		</view>
	</view>
</template>

<script>
	import {phoneinstallmentlottery} from "../../api/myphone.js";
	export default {
		data() {
			return {
				page: 1,
				size: 10,
				ids:'',
				status: 'loadmore', //加载前值为loadmore，加载中为loading，没有数据为nomore
				selllist:[]
			}
		},
		onLoad(e) {
			console.log(e.id);
			this.ids = e.id
			this.getselllist()
		},

		methods: {
			getselllist() {
				phoneinstallmentlottery({
					page: this.page,
					installment_id:this.ids
				}).then(res => {
					if (res.code == 1) {
						let list = res.data.data;
						this.selllist = this.page == 1 ? list : this.selllist.concat(list);
						// console.log(this.goodlist2);
						if (list.length < this.size) this.status = 'nomore';
						else this.status = 'loading';
					}
			
				})
			},
		},
		onReachBottom() {
			if (this.status != 'nomore') {
				this.page = this.page + 1
				this.getselllist()
			}
		},
	}
</script>
<style>

</style>
<style scoped  lang="scss">
	/deep/ .u-navbar__content__title {
		color: #333 !important;
	}

	/deep/.uicon-arrow-left {
		color: #333 !important;
	}

	/deep/ .u-navbar__content__right__text {
		color: #333 !important;
	}
	.wrap{
		width: 690rpx;
		min-height: 226rpx;
		background: #F2F2F2;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 30rpx auto;
		padding-bottom: 30rpx;
		.tit{
			width: 690rpx;
			text-align: center;
			padding-top: 40rpx;
			font-weight: 400;
			font-size: 32rpx;
			color: #333333;
		}
		.item{
			display: flex;
			align-items: center;
			width: 640rpx;
			margin: 0 auto;
			font-weight: 400;
			font-size: 28rpx;
			color: #666;
			margin-top: 20rpx;
			justify-content: space-between;
		}
	}
</style>